package com.sanjiahantang.youjiarole.module.common.beans;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.sanjiahantang.youjiarole.base.BaseBean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 账户明细与银行卡列表信息
 * Created by zy on 2017/9/30.
 */

public class UserOBean extends BaseBean {
    private String data;

    public List<Data> getData() {
        return new Gson().fromJson(data,new TypeToken<List<Data>>(){}.getType());
    }

    public List<Data> getList(){
        ListData listData = new Gson().fromJson(data,ListData.class);
        return listData == null ? new ArrayList<Data>() : listData.getList();
    }

    public static class ListData extends ListBean{
        private List<Data> list;

        public List<Data> getList() {
            return list;
        }

        public void setList(List<Data> list) {
            this.list = list;
        }
    }

    public void setData(String data) {
        this.data = data;
    }

    public static class Data implements Serializable {

        /**
         * mode : 1
         * orderId : 123123123
         * createTime : 2017-09-24T07:49:06.000+0000
         * action : 2
         * mriId : 3
         * state : 1
         *
         *\"bankPhone\": \"12312\",
         \"cardName\": \"123123\",
         \"mbciId\": 2,
         \"phone\": \"13716020210\",
         \"userName\": \"张三\",
         \"cardNo\": \"123\",
         \"openingBank\": \"5\"
         */
        private String userLogin;
        private String userName;
        private String money;
        private int mode;
        private String orderId;
        private String createTime;
        private int action;
        private int mriId;
        private int state;
        private String openingBank;
        private String cardNo;
        //我的项目合伙人
        private String address;
        private String phone;
        private String roleId;
        private String orderCode;
        private int userRole;
        private String subcontractPhone;
        private String subcontractName;
        private String engnieeName;

        public String getSubcontractPhone() {
            return subcontractPhone;
        }

        public void setSubcontractPhone(String subcontractPhone) {
            this.subcontractPhone = subcontractPhone;
        }

        public String getSubcontractName() {
            return subcontractName;
        }

        public void setSubcontractName(String subcontractName) {
            this.subcontractName = subcontractName;
        }

        public String getOrderCode() {
            return orderCode;
        }

        public void setOrderCode(String orderCode) {
            this.orderCode = orderCode;
        }

        public int getUserRole() {
            return userRole;
        }

        public void setUserRole(int userRole) {
            this.userRole = userRole;
        }

        public String getRoleId() {
            return roleId;
        }

        public void setRoleId(String roleId) {
            this.roleId = roleId;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public String getPhone() {
            return phone;
        }

        public void setPhone(String phone) {
            this.phone = phone;
        }

        public String getCardNo() {
            return cardNo;
        }

        public void setCardNo(String cardNo) {
            this.cardNo = cardNo;
        }

        public String getOpeningBank() {
            return openingBank;
        }

        public void setOpeningBank(String openingBank) {
            this.openingBank = openingBank;
        }

        public String getUserLogin() {
            return userLogin;
        }

        public void setUserLogin(String userLogin) {
            this.userLogin = userLogin;
        }

        public String getUserName() {
            return userName;
        }

        public void setUserName(String userName) {
            this.userName = userName;
        }

        public String getMoney() {
            return money;
        }

        public void setMoney(String money) {
            this.money = money;
        }

        public int getMode() {
            return mode;
        }

        public void setMode(int mode) {
            this.mode = mode;
        }

        public String getOrderId() {
            return orderId;
        }

        public void setOrderId(String orderId) {
            this.orderId = orderId;
        }

        public String getCreateTime() {
            return createTime;
        }

        public void setCreateTime(String createTime) {
            this.createTime = createTime;
        }

        public int getAction() {
            return action;
        }

        public void setAction(int action) {
            this.action = action;
        }

        public int getMriId() {
            return mriId;
        }

        public void setMriId(int mriId) {
            this.mriId = mriId;
        }

        public int getState() {
            return state;
        }

        public void setState(int state) {
            this.state = state;
        }


        public String getEngnieeName() {
            return engnieeName;
        }

        public void setEngnieeName(String engnieeName) {
            this.engnieeName = engnieeName;
        }
    }
}
